Recently, there has been a demand for a highly reliable storage device that has a plurality of HDDs (Hard Disk Drives) embedded therein. To satisfy this demand, most storage devices add a check code (DIF: Data Integrity Field) to data that is received from a host, such as a computer. With a check code added therewith, a storage device checks data consistency when data is transferred, for example, when data is written to an HDD, thereby preventing data inconsistency caused by a defective component or the like. With this configuration, storage devices give an assurance on data that is written to an HDD.
A miswriting of data to an HDD may occur in a storage device. A miswriting to an HDD indicates, for example, a data writing error that occurs when writing data to an HDD and that is undetectable by the HDD. Because such a miswriting to an HDD is not detected as an error by the HDD, the HDD does not output a notice indicative of the occurrence of an error, and therefore data stored in the HDD is not updated and old data remains, with the check code remaining as it is. If an assurance given on data in accordance with a check code is used, because the check code indicates that the data is correct, it is difficult to detect the error.
The following technologies have been proposed that solve a miswriting to an HDD. A first technology that prevents miswriting involves writing data to an HDD, then reading data from the same section of the HDD, and then comparing the written data with the read data. A disadvantage with the first technology is that, because the data reading and the data comparing are performed each time data is written to an HDD, the I/O (Input/Output) performance is decreased.
A second conventional technology that avoids miswriting involves performing no special process when data is written to an HDD, but, when data is read, redundant data is read from a RAID and then the RAID is checked for consistency. The second technology is intended for comparing, for example, mirrored data with each other. A disadvantage with the second technology is that, although the occurrence of a miswriting is detectable, the HDD in which the miswriting has occurred is not identified and, therefore, it is difficult to repair the data.
A third conventional technology involves giving, each time data is written, incremented writing information to the data and storing the given writing information and, when data is read, checking whether the stored writing information is accordant with the writing information given to the data. A fourth conventional technology involves adding a check code to each of the data written to different physical disks for data management. A fifth conventional technology involves, when I/O (input/output) to a disk is performed block by block, adding a state updating value indicative of the state of the updating, such as generation and time, to each of the data block by block and then checking, by using the state updating value, the data block by block when the data is read.    Patent Document 1: Japanese Patent No. 4454204    Patent Document 2: Japanese Laid-open Patent Publication No. 10-171608    Patent Document 3: Japanese Laid-open Patent Publication No. 2006-252530
A disadvantage with the third technology, in which incremented writing information is given to data, is that, because writing information is given to all the data and, when the data is read, it is checked one by one, the load of processes for detecting any miswriting is increased. A disadvantage with the fourth technology, in which a check code is added to each of the data written to different physical disks, is that the load of processes for detecting any miswriting is increased. A disadvantage with the fifth technology, in which a state updating value is added to each block, is that, because an error check is made block by block, the probability of errors being detected is reduced and, therefore, the reliability is reduced.